﻿using Stee.CAP8.MessageBus.Interface.Interfaces;
using Stee.CAP8.MessageBus.Sagas.Payment.Dtos;
using System;
using System.Threading.Tasks;

namespace Stee.CAP8.MessageBus.Sagas.Payment.Handlers
{
    //1.去掉所有对Stee.CAP8.MessageBus.Sagas.Core引用

    //2.将以下逻辑加入到本程序中
    //
    //    var methodInfo = typeClass.GetMethod(actionName);
    //    methodInfo.Invoke(typeInstalce, new[] { _sagaData}); 
    //     message.ObjectToData(_sagaData);
    //   message.Reply(this);

    // 3.retry加到userstory


    public class PaymentService
    {
        public PaymentService()
        {
        }

        public void Subscirbie()
        {

        }
        //改为paymentInfo
        public Task Payment(PaymentInfo payinfo)
        {

            Console.WriteLine("收到支付信息" + payinfo.PaymentMethod + "||" + payinfo.Amount);
            Console.WriteLine("支付操作");


            return Task.CompletedTask;

        }

        public void RunSubSaga()
        {
            throw new NotImplementedException();
        }
    }


 



}
